--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
      name:  <unnamed>
       log:  C:/Users/agerster/Dropbox/Projekt_Gebaeudeausweis/Auswertung JAERE_final/log/2019_6_5_analyses_price_effects.log
  log type:  text
 opened on:   5 Jun 2019, 15:24:05

. 
. ***************************************
. ***************************************
. * Analysis (panel data set)
. ***************************************
. ***************************************
. 
. *************************************************
. * generate and recode variables
. ************************************************* 
. 
. bysort geo (time): gen geo1 = _n == 1 

. bysort geo (time): gen geolast = _n == _N 

. 
. * Define compliers
. bysort geo: egen obs_geo = count(geo)

. bysort geo: egen epc_geo = total(epc)

. gen complier = 0

. replace complier = 1 if (obs_geo != epc_geo) & epc_geo != 0
(73,249 real changes made)

. 
. * Code year of construction
. recode baujahr_kat2(2015 = 2002)
(baujahr_kat2: 0 changes made)

. replace baujahr_kat2 = 9999 if missing(baujahr_kat2)
(0 real changes made)

. 
. egen baujahr_kat3 = cut(baujahr), at(1900,1977,2002,2020)

. replace baujahr_kat3 = 9999 if missing(baujahr_kat3)
(0 real changes made)

. 
. egen baujahr_med = cut(baujahr) if geo1 == 1, group(2)
(347151 missing values generated)

. bysort geo (baujahr_med): replace baujahr_med = baujahr_med[_n-1] if _n > 1
(347,151 real changes made)

. replace baujahr_med = 9999 if missing(baujahr_med)
(0 real changes made)

. 
. gen baujahr_adopt = baujahr_kat

. recode baujahr_adopt ( 1930 1950 1960 1970 = 1900) (1995 1990 = 1977) (2014 2008 = 2002)
(baujahr_adopt: 262119 changes made)

. gen modern_adopt = modern_kat

. recode modern_adopt (1990 = 1977) (2015 2008 = 2002)
(modern_adopt: 62197 changes made)

. 
. * recode continuous variable for number of rooms
. replace zimmer_cont = . if zimmer == .
(0 real changes made)

. gen zimmer_cont2 = zimmer_cont^2

. 
. * time of disclosure
. gen epc_change_time = time*epc_change 

. gsort geo -epc_change_time

. bysort geo: replace epc_change_time = epc_change_time[_n-1] if _n > 1
(65,865 real changes made)

. 
. * dummy which is unity for disclosing sellers after disclosure 
. gen epc_post = epc

. replace epc_post = 0 if epc_change_time < monthly("2014 05","YM")
(101,928 real changes made)

. 
. 
. ** clean eec variable
. gen eec_total = eec

. 
. * cutoffs for the definition of classes
. mat evk_values = J(10,1,.)

. mat evk_values[1,1] = 0 // 0 bis 30: A+

. mat evk_values[2,1] = 30

. mat evk_values[3,1] = 50

. mat evk_values[4,1] = 75

. mat evk_values[5,1] = 100

. mat evk_values[6,1] = 130

. mat evk_values[7,1] = 160

. mat evk_values[8,1] = 200

. mat evk_values[9,1] = 250 // >  250: G 

. mat evk_values[10,1] = . // >  250: G 

. 
. * when eec does not match -> set to missing
. foreach i of numlist 2(1)10 {
  2.         replace eec = 99 if eec==`=`i'-1' & !(evk>=evk_values[`=`i'-1',1] & evk < evk_values[`i',1] )
  3. }
(6,336 real changes made)
(9,962 real changes made)
(162 real changes made)
(249 real changes made)
(246 real changes made)
(387 real changes made)
(231 real changes made)
(137 real changes made)
(145 real changes made)

. ** recode evk_nomiss (substract mean, /100)
. cap drop evk_nomiss_rec

. gen evk_nomiss_rec = evk_nomiss

. 
. sum evk_nomiss if evk_nomiss!=0, d

        Annual energy consumption in kWh/m2 (missings
                       coded as zero)
-------------------------------------------------------------
      Percentiles      Smallest
 1%         30.8             16
 5%         60.6             16
10%         79.1             16       Obs             126,959
25%          112             16       Sum of Wgt.     126,959

50%        156.3                      Mean            171.378
                        Largest       Std. Dev.      81.59437
75%        218.7         452.22
90%        286.9          452.6       Variance       6657.641
95%        330.7          452.6       Skewness       .7767268
99%          404            496       Kurtosis       3.346196

. replace evk_nomiss_rec = evk_nomiss_rec - r(mean)
(412,637 real changes made)

. replace evk_nomiss_rec = 0 if epc==0
(285,675 real changes made)

. replace evk_nomiss_rec = evk_nomiss_rec/100 // recode so that units are more easily interpretable
(126,962 real changes made)

. 
. gen evk_nomiss_rec2 = evk_nomiss_rec^2

. 
. 
. * create 3 groups by year of contruction
. ****************
. tab baujahr_kat3, gen(bau_kat)

baujahr_kat |
          3 |      Freq.     Percent        Cum.
------------+-----------------------------------
       1900 |    249,070       60.36       60.36
       1977 |    128,285       31.09       91.45
       2002 |     35,282        8.55      100.00
------------+-----------------------------------
      Total |    412,637      100.00

. 
. * Matrix generieren:
. mat bau_values = J(3,1,.)

. mat bau_values[1,1] = 1900

. mat bau_values[2,1] = 1977

. mat bau_values[3,1] = 2002

. 
. * Variable generieren:
. foreach num of numlist 1/3 {
  2.         rename bau_kat`num' bau_`=bau_values[`num',1]'
  3.         gen epc_bau_`=bau_values[`num',1]' = epc*bau_`=bau_values[`num',1]'
  4.         gen bankspost_bau_`=bau_values[`num',1]' = bankspost*bau_`=bau_values[`num',1]'
  5. }

. 
. 
. 
. **************************************************
. * Globals for house characteristics
. **************************************************
. 
. global merkat baujahr_adopt modern_adopt objektkat qualitaet heizart

. global merkat_i ""

. foreach x of global merkat {
  2.         global merkat_i $merkat_i i.`x' 
  3. }

. global merkont grundflaeche wohnflaeche zimmer_cont grundflaeche2 wohnflaeche2 

. 
. 
. 
. ******************************************
. ******************************************
. * Auswertungen
. ******************************************
. ******************************************
. 
. * OLS regression
. *******************
. 
. xtset plz
       panel variable:  plz (unbalanced)

. xtreg logkaufp epc $merkat_i $merkont ib1.objektzus ib5.anbietertyp i.time if geolast, fe vce(robust)
note: 4.anbietertyp omitted because of collinearity
note: 5b.anbietertyp identifies no observations in the sample

Fixed-effects (within) regression               Number of obs     =     65,486
Group variable: plz                             Number of groups  =      7,333

R-sq:                                           Obs per group:
     within  = 0.5500                                         min =          1
     between = 0.1701                                         avg =        8.9
     overall = 0.2937                                         max =        119

                                                F(56,7332)        =     877.91
corr(u_i, Xb)  = -0.0085                        Prob > F          =     0.0000

                                     (Std. Err. adjusted for 7,333 clusters in plz)
-----------------------------------------------------------------------------------
                  |               Robust
         logkaufp |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
------------------+----------------------------------------------------------------
              epc |   .0801287    .003621    22.13   0.000     .0730304     .087227
                  |
    baujahr_adopt |
            1977  |   .2765867   .0041044    67.39   0.000     .2685408    .2846326
            2002  |   .4162632   .0057387    72.54   0.000     .4050136    .4275128
                  |
     modern_adopt |
            1977  |   .0616853   .0313677     1.97   0.049     .0001956    .1231751
            2002  |   .0729636   .0307675     2.37   0.018     .0126504    .1332767
            9999  |   .0381461   .0306941     1.24   0.214    -.0220232    .0983154
                  |
        objektkat |
             MFH  |   .0123992   .0058896     2.11   0.035     .0008539    .0239445
   EFH, Bungalow  |    .100591   .0040765    24.68   0.000     .0925998    .1085822
              kA  |  -.0393265   .0055483    -7.09   0.000    -.0502029   -.0284502
                  |
        qualitaet |
          normal  |  -.1180175   .0047109   -25.05   0.000    -.1272522   -.1087829
         einfach  |  -.2196241   .0103544   -21.21   0.000    -.2399216   -.1993266
              kA  |  -.0872475   .0042644   -20.46   0.000     -.095607    -.078888
                  |
          heizart |
   Etagenheizung  |  -.0733377    .008841    -8.30   0.000    -.0906686   -.0560069
     Ofenheizung  |  -.2046434   .0118008   -17.34   0.000    -.2277763   -.1815105
              kA  |  -.0409011   .0033321   -12.27   0.000     -.047433   -.0343692
                  |
     grundflaeche |   .0003422   8.23e-06    41.57   0.000     .0003261    .0003584
      wohnflaeche |   .0057014   .0001037    54.96   0.000      .005498    .0059047
      zimmer_cont |  -.0052843    .001175    -4.50   0.000    -.0075877   -.0029809
    grundflaeche2 |  -5.66e-08   2.07e-09   -27.37   0.000    -6.07e-08   -5.26e-08
     wohnflaeche2 |  -6.24e-06   2.12e-07   -29.40   0.000    -6.66e-06   -5.83e-06
                  |
        objektzus |
renovierungsbed.  |  -.2702825   .0059981   -45.06   0.000    -.2820405   -.2585244
              kA  |  -.1243123   .0035193   -35.32   0.000    -.1312111   -.1174134
                  |
      anbietertyp |
        Finanzen  |  -.0319697   .0039284    -8.14   0.000    -.0396705   -.0242689
          Makler  |          0  (omitted)
          privat  |          0  (empty)
                  |
             time |
             637  |   .0338973   .0243559     1.39   0.164    -.0138473    .0816418
             638  |   .0705769    .023016     3.07   0.002     .0254589    .1156949
             639  |   .0503057   .0227643     2.21   0.027     .0056811    .0949303
             640  |   .0520364   .0225402     2.31   0.021     .0078511    .0962218
             641  |   .0511406    .022672     2.26   0.024     .0066969    .0955842
             642  |   .0626162   .0224264     2.79   0.005      .018654    .1065783
             643  |    .059776   .0223648     2.67   0.008     .0159345    .1036174
             644  |   .0560623   .0223816     2.50   0.012      .012188    .0999366
             645  |   .0623765   .0227552     2.74   0.006     .0177698    .1069832
             646  |   .0571109   .0224543     2.54   0.011     .0130941    .1011277
             647  |   .0526643   .0226061     2.33   0.020     .0083499    .0969787
             648  |   .0602506    .022368     2.69   0.007     .0164029    .1040983
             649  |   .0690098   .0221296     3.12   0.002     .0256293    .1123902
             650  |   .0732393   .0224649     3.26   0.001     .0292016    .1172771
             651  |   .0714139   .0224708     3.18   0.001     .0273646    .1154632
             652  |   .0446009   .0225696     1.98   0.048      .000358    .0888438
             653  |   .0368249   .0225524     1.63   0.103    -.0073843    .0810342
             654  |   .0462851   .0225006     2.06   0.040     .0021775    .0903927
             655  |   .0291497    .022468     1.30   0.195    -.0148941    .0731935
             656  |    .030591    .022459     1.36   0.173    -.0134352    .0746171
             657  |   .0376584    .022806     1.65   0.099     -.007048    .0823647
             658  |    .036358   .0224073     1.62   0.105    -.0075667    .0802828
             659  |   .0602891   .0228854     2.63   0.008     .0154272    .1051511
             660  |   .0368956   .0225431     1.64   0.102    -.0072953    .0810865
             661  |   .0355227   .0226363     1.57   0.117    -.0088509    .0798963
             662  |   .0644707   .0226934     2.84   0.005     .0199852    .1089562
             663  |   .0602607   .0230056     2.62   0.009      .015163    .1053583
             664  |   .0677926    .022829     2.97   0.003     .0230413     .112544
             665  |   .0641362   .0230586     2.78   0.005     .0189348    .1093376
             666  |   .0631646   .0229437     2.75   0.006     .0181883    .1081409
             667  |    .053258   .0235041     2.27   0.023     .0071833    .0993327
             668  |   .0569844   .0230166     2.48   0.013     .0118653    .1021035
             669  |   .0966019   .0217647     4.44   0.000     .0539367     .139267
                  |
            _cons |   11.19187   .0385224   290.53   0.000     11.11635    11.26738
------------------+----------------------------------------------------------------
          sigma_u |   .5560692
          sigma_e |  .31628618
              rho |  .75556025   (fraction of variance due to u_i)
-----------------------------------------------------------------------------------

. est sto ols

. 
. 
. * DiD regressions
. *******************
. 
. * DiD: 
. tsset geo time
       panel variable:  geo (unbalanced)
        time variable:  time, 2013m1 to 2015m10, but with gaps
                delta:  1 month

. qui xtreg logkaufp epc i.time, fe vce(cluster geo)

. est sto did

. 
. * DiD: heterngeneity by year of construction
. qui xtreg logkaufp epc epc_bau_1977 epc_bau_1900 i.time, fe vce(cluster geo)

. est sto did_bau

. 
. 
.         
. * IV regressions
. *****************
. 
. * DiD: reduced form
. quietly xtreg logkaufp bankspost i.time, fe vce(cluster geo)

. est sto did_rf

. 
. * DiD: first stage
. quietly xtreg epc bankspost i.time, fe vce(cluster geo)

. est sto did_fs

. * weak instrument check
. test bankspost = 0

 ( 1)  bankspost = 0

       F(  1, 65485) =  194.44
            Prob > F =    0.0000

. 
. * IV: Parsimonious Specification
. quietly xtivreg logkaufp i.time (epc = bankspost), fe vce(cluster geo) first

. est sto iv

. 
. * IV: heterngeneity by year of construction
. quietly xtivreg logkaufp i.time (epc_bau_1900 epc_bau_1977 epc = bankspost_bau_1900 bankspost_bau_1977 bankspost), fe vce(cluster geo)

. est sto iv_bau  

. 
.         
. 
. 
. ********************************************************************************
. * Table 4: Estimates of the Effect of Energy Information Disclosure on House Prices
. ********************************************************************************
. estout ols did did_bau iv iv_bau, ///
>         cells( "b(fmt(3) star) se(par fmt(3))" ) ///
>         stats(N N_clust, fmt(%9.0fc %9.0fc)) ///
>         varwidth(12) substitute(_ \_) ///
>         starlevels(* 0.05 ** 0.01) ///
>         keep(epc epc*) // style(tex)

--------------------------------------------------------------------------------------------------------------------------------------------------------
                      ols                         did                     did\_bau                          iv                      iv\_bau               
                        b             se            b             se            b             se            b             se            b             se
--------------------------------------------------------------------------------------------------------------------------------------------------------
epc                 0.080**      (0.004)       -0.018**      (0.001)        0.001        (0.003)       -0.117**      (0.018)       -0.033        (0.021)
epc\_bau\_1977                                                               -0.007*       (0.003)                                   -0.039*       (0.018)
epc\_bau\_1900                                                               -0.028**      (0.003)                                   -0.095**      (0.017)
--------------------------------------------------------------------------------------------------------------------------------------------------------
N                  65,486                     412,637                     412,637                     412,637                     412,637               
N\_clust             7,333                      65,486                      65,486                      65,486                      65,486               
--------------------------------------------------------------------------------------------------------------------------------------------------------

. 
. 
. ********************************************************************************
. * Table 7 (Online Appendix H): First-Stage and Reduced-Form Estimates for the IV Model
. ********************************************************************************
. 
. estout did_fs did_rf iv, ///
>         cells(b(fmt(3) star) se(fmt(3)) ci(fmt(3))   ) ///
>         stats(N N_clust, fmt(%9.0fc %9.0fc)) ///
>         varwidth(12) starlevels(* 0.05 ** 0.01) ///
>         drop(*time _cons) // style(tex) 

---------------------------------------------------------
                   did_fs         did_rf             iv  
                b/se/ci95      b/se/ci95      b/se/ci95  
---------------------------------------------------------
bankspost           0.151**       -0.018**               
                    0.011          0.003                 
              0.130,0.172   -0.023,-0.013                 
epc                                              -0.117**
                                                  0.018  
                                           -0.152,-0.081  
---------------------------------------------------------
N                 412,637        412,637        412,637  
N_clust            65,486         65,486         65,486  
---------------------------------------------------------

.         
.         
.         
.         
.         
. ***********************************************************************************
. * Table 5: Estimates of the Effect of Energy Information Disclosure on House Prices
. *********************************************************************************** 
. 
. ***
. * Robustness: IV
. ***
. 
. * excluding newly renovated homes (R3, C8c)
. global cond if (modern<2013)|missing(modern) 

. quietly xtivreg logkaufp i.time (epc = bankspost) $cond, fe vce(cluster geo) first

. est sto iv_modern

.         
. * other energy performance certificates
. global cond if eec==99 

. quietly xtivreg logkaufp i.time (epc = bankspost) $cond, fe vce(cluster geo) first

. est sto iv_newepc

.         
. * fuzzy RD regression
. xtivreg logkaufp (epc = postmai) if inrange(time, `=monthly("2014 04","YM")', `=monthly("2014 05","YM")'), fe vce(cluster geo)

Fixed-effects (within) IV regression            Number of obs     =     28,887
Group variable: geo                             Number of groups  =     17,414

R-sq:                                           Obs per group:
     within  =      .                                         min =          1
     between = 0.0291                                         avg =        1.7
     overall = 0.0233                                         max =          2


                                                Wald chi2(1)      =     536.84
corr(u_i, Xb)  = -0.1985                        Prob > chi2       =     0.0000

                               (Std. Err. adjusted for 17,414 clusters in geo)
------------------------------------------------------------------------------
             |               Robust
    logkaufp |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         epc |  -.0746552   .0032221   -23.17   0.000    -.0809704   -.0683401
       _cons |    12.2641   .0010604  1.2e+04   0.000     12.26202    12.26617
-------------+----------------------------------------------------------------
     sigma_u |  .68161596
     sigma_e |  .02952378
         rho |  .99812738   (fraction of variance due to u_i)
------------------------------------------------------------------------------
Instrumented:   epc
Instruments:    postmai
------------------------------------------------------------------------------

. est sto fuzzy_rd

. 
. 
. ***
. * Robustness: Panel
. ***
. 
. * excluding newly renovated homes (R3, C8c)
. global cond if (modern<2013)|missing(modern) 

. qui xtreg logkaufp epc i.time $cond , fe vce(cluster geo)

. est sto panel_modern

. 
. * Energy performance certificates without classes
. global cond if eec==99 

. qui xtreg logkaufp epc i.time $cond , fe vce(cluster geo)

. est sto panel_newepc

. 
. 
. * matching DiD
. preserve

.         merge 1:1 geo time using "$WORKDATA/result_psmatch.dta", update 

    Result                           # of obs.
    -----------------------------------------
    not matched                       301,616
        from master                   301,616  (_merge==1)
        from using                          0  (_merge==2)

    matched                           111,021
        not updated                   111,021  (_merge==3)
        missing updated                     0  (_merge==4)
        nonmissing conflict                 0  (_merge==5)
    -----------------------------------------

. 
.         drop if missing(matchid)
(301,616 observations deleted)

.         drop _merge

. 
.         * create variables for both the treated and matched controls
.         gen aux = eec if complier==1
(43,299 missing values generated)

.         bysort matchid: egen eec_matchid = max(aux)

.         drop aux

.         gen aux = modern if complier==1
(95,162 missing values generated)

.         bysort matchid: egen modern_matchid = max(aux)
(84961 missing values generated)

.         drop aux

.         
.         ** keep only when a month is available for both matched obs
.         bysort matchid time: gen count = _N 

.         keep if count == 2
(45,029 observations deleted)

.         
.         * DiD: 
.         tsset geo time
       panel variable:  geo (unbalanced)
        time variable:  time, 2013m1 to 2015m9, but with gaps
                delta:  1 month

.         distinct geo 

       |        Observations
       |      total   distinct
-------+----------------------
   geo |      65992      13960

.         xtreg logkaufp epc i.time, fe vce(cluster matchid)

Fixed-effects (within) regression               Number of obs      =     65992
Group variable: geo                             Number of groups   =     13960

R-sq:  within  = 0.1803                         Obs per group: min =         1
       between = 0.0032                                        avg =       4.7
       overall = 0.0013                                        max =        30

                                                F(33,6979)         =     43.81
corr(u_i, Xb)  = -0.1200                        Prob > F           =    0.0000

                            (Std. Err. adjusted for 6,980 clusters in matchid)
------------------------------------------------------------------------------
             |               Robust
    logkaufp |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         epc |  -.0111188   .0014743    -7.54   0.000    -.0140087   -.0082288
             |
        time |
        637  |  -.0037754   .0021917    -1.72   0.085    -.0080719    .0005211
        638  |  -.0088474    .002764    -3.20   0.001    -.0142657   -.0034291
        639  |   -.012905   .0034669    -3.72   0.000    -.0197012   -.0061088
        640  |  -.0208806   .0036625    -5.70   0.000    -.0280602    -.013701
        641  |  -.0281751   .0039965    -7.05   0.000    -.0360095   -.0203406
        642  |  -.0338371   .0044775    -7.56   0.000    -.0426144   -.0250598
        643  |  -.0441856   .0045775    -9.65   0.000    -.0531588   -.0352124
        644  |  -.0505374   .0047517   -10.64   0.000    -.0598521   -.0412226
        645  |  -.0587492   .0049337   -11.91   0.000    -.0684208   -.0490776
        646  |  -.0660765    .005048   -13.09   0.000    -.0759722   -.0561809
        647  |  -.0711364   .0051262   -13.88   0.000    -.0811852   -.0610875
        648  |  -.0782803   .0052005   -15.05   0.000    -.0884749   -.0680857
        649  |  -.0852239     .00528   -16.14   0.000    -.0955743   -.0748735
        650  |  -.0934083   .0053674   -17.40   0.000      -.10393   -.0828867
        651  |  -.1021577   .0054612   -18.71   0.000    -.1128633   -.0914522
        652  |  -.1094728    .005634   -19.43   0.000    -.1205172   -.0984284
        653  |  -.1177602   .0057959   -20.32   0.000    -.1291219   -.1063985
        654  |  -.1270282   .0059308   -21.42   0.000    -.1386543   -.1154021
        655  |  -.1341828   .0061353   -21.87   0.000      -.14621   -.1221557
        656  |  -.1432992   .0063575   -22.54   0.000    -.1557617   -.1308366
        657  |  -.1505476   .0066872   -22.51   0.000    -.1636566   -.1374387
        658  |  -.1589032   .0069132   -22.99   0.000    -.1724552   -.1453512
        659  |  -.1628157   .0072407   -22.49   0.000    -.1770097   -.1486217
        660  |    -.16894   .0078186   -21.61   0.000    -.1842667   -.1536132
        661  |  -.1718108   .0077115   -22.28   0.000    -.1869277   -.1566939
        662  |  -.1759288   .0079114   -22.24   0.000    -.1914374   -.1604201
        663  |  -.1833638   .0082735   -22.16   0.000    -.1995823   -.1671453
        664  |  -.1898823    .008554   -22.20   0.000    -.2066506   -.1731139
        665  |  -.1961871   .0088451   -22.18   0.000    -.2135261   -.1788481
        666  |   -.205587    .009251   -22.22   0.000    -.2237218   -.1874522
        667  |  -.2140881   .0095085   -22.52   0.000    -.2327276   -.1954485
        668  |  -.2219403   .0098989   -22.42   0.000    -.2413452   -.2025354
             |
       _cons |   12.45828   .0050558  2464.15   0.000     12.44837    12.46819
-------------+----------------------------------------------------------------
     sigma_u |   .6090333
     sigma_e |  .04603541
         rho |  .99431896   (fraction of variance due to u_i)
------------------------------------------------------------------------------

.         est sto panel_mdid

. restore

. 
. 
. 
. ** Anticipation effects
.         
. * omit observations that have disclosed between October 2013 and April 2014     
. global antcond !inrange(epc_change_time,monthly("2013 10","YM"),monthly("2014 04","YM"))

. 
. tsset geo time
       panel variable:  geo (unbalanced)
        time variable:  time, 2013m1 to 2015m10, but with gaps
                delta:  1 month

. xtreg logkaufp epc i.time if $antcond, fe vce(cluster geo)

Fixed-effects (within) regression               Number of obs     =    391,424
Group variable: geo                             Number of groups  =     63,671

R-sq:                                           Obs per group:
     within  = 0.1541                                         min =          1
     between = 0.0003                                         avg =        6.1
     overall = 0.0007                                         max =         34

                                                F(34,63670)       =     131.97
corr(u_i, Xb)  = -0.1057                        Prob > F          =     0.0000

                               (Std. Err. adjusted for 63,671 clusters in geo)
------------------------------------------------------------------------------
             |               Robust
    logkaufp |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         epc |  -.0177647   .0016501   -10.77   0.000    -.0209989   -.0145305
             |
        time |
        637  |  -.0060435   .0009614    -6.29   0.000    -.0079278   -.0041592
        638  |  -.0121211   .0011181   -10.84   0.000    -.0143126   -.0099297
        639  |  -.0200625   .0012787   -15.69   0.000    -.0225688   -.0175563
        640  |   -.029248   .0013988   -20.91   0.000    -.0319897   -.0265063
        641  |   -.037107   .0015023   -24.70   0.000    -.0400514   -.0341625
        642  |  -.0446735   .0016264   -27.47   0.000    -.0478612   -.0414858
        643  |  -.0526278     .00172   -30.60   0.000     -.055999   -.0492566
        644  |  -.0608098   .0018777   -32.39   0.000    -.0644901   -.0571296
        645  |  -.0696521   .0019571   -35.59   0.000     -.073488   -.0658162
        646  |  -.0774029   .0020204   -38.31   0.000    -.0813628    -.073443
        647  |  -.0814219   .0019909   -40.90   0.000     -.085324   -.0775199
        648  |  -.0866948   .0020453   -42.39   0.000    -.0907035   -.0826861
        649  |  -.0916464   .0020988   -43.67   0.000    -.0957601   -.0875327
        650  |  -.0963074   .0021667   -44.45   0.000    -.1005541   -.0920607
        651  |  -.1015357   .0022193   -45.75   0.000    -.1058855   -.0971858
        652  |  -.1051191   .0023383   -44.96   0.000    -.1097021   -.1005361
        653  |  -.1091549   .0024012   -45.46   0.000    -.1138613   -.1044485
        654  |  -.1138326   .0024519   -46.43   0.000    -.1186383   -.1090269
        655  |  -.1178389   .0025169   -46.82   0.000     -.122772   -.1129058
        656  |  -.1229936   .0025779   -47.71   0.000    -.1280464   -.1179409
        657  |  -.1289432   .0026362   -48.91   0.000    -.1341101   -.1237763
        658  |  -.1336215   .0026762   -49.93   0.000    -.1388669   -.1283762
        659  |  -.1370385   .0027203   -50.38   0.000    -.1423704   -.1317067
        660  |  -.1412459   .0027709   -50.98   0.000    -.1466768    -.135815
        661  |  -.1439566   .0028024   -51.37   0.000    -.1494494   -.1384638
        662  |  -.1467284   .0028404   -51.66   0.000    -.1522956   -.1411611
        663  |  -.1504351   .0029116   -51.67   0.000    -.1561419   -.1447283
        664  |  -.1546935   .0029773   -51.96   0.000     -.160529    -.148858
        665  |  -.1603408    .003027   -52.97   0.000    -.1662738   -.1544078
        666  |  -.1665637   .0030863   -53.97   0.000    -.1726129   -.1605145
        667  |  -.1710343     .00313   -54.64   0.000    -.1771691   -.1648996
        668  |  -.1770642   .0031813   -55.66   0.000    -.1832996   -.1708289
        669  |  -.1835452   .0032428   -56.60   0.000    -.1899011   -.1771894
             |
       _cons |    12.3542   .0019458  6349.23   0.000     12.35039    12.35802
-------------+----------------------------------------------------------------
     sigma_u |  .66362741
     sigma_e |  .05496297
         rho |  .99318724   (fraction of variance due to u_i)
------------------------------------------------------------------------------

. est sto panel_anticip

. 
. quietly xtivreg logkaufp i.time (epc = bankspost) if $antcond, fe vce(cluster geo) first

. est sto iv_anticip

. 
. ***
. * results for paper
. ***
. 
. estout panel_modern panel_newepc panel_anticip panel_mdid, ///
>         cells("b(fmt(3) star) se(fmt(3))"   ) ///
>         stats(N N_g, fmt(%9.0fc %9.0fc)) ///
>         varwidth(12) starlevels(* 0.05 ** 0.01) ///
>         drop(*time _cons) // style(tex) 

----------------------------------------------------------------------------------------------------------------------------
             panel_modern                panel_newepc                panel_anti~p                  panel_mdid               
                        b             se            b             se            b             se            b             se
----------------------------------------------------------------------------------------------------------------------------
epc                -0.018**        0.001       -0.019**        0.002       -0.018**        0.002       -0.011**        0.001
----------------------------------------------------------------------------------------------------------------------------
N                 400,623                     381,525                     391,424                      65,992               
N_g                63,596                      62,791                      63,671                      13,960               
----------------------------------------------------------------------------------------------------------------------------

.         
. estout iv_modern iv_newepc iv_anticip fuzzy_rd, ///
>         cells("b(fmt(3) star) se(fmt(3))") ///
>         stats(N N_clust, fmt(%9.0fc %9.0fc)) ///
>         varwidth(30) starlevels(* 0.05 ** 0.01) ///
>         drop(*time _cons) // style(tex)

----------------------------------------------------------------------------------------------------------------------------------------------
                                  iv_modern                   iv_newepc                  iv_anticip                    fuzzy_rd               
                                          b             se            b             se            b             se            b             se
----------------------------------------------------------------------------------------------------------------------------------------------
epc                                  -0.113**        0.018       -0.122**        0.020       -0.121**        0.021       -0.075**        0.003
----------------------------------------------------------------------------------------------------------------------------------------------
N                                   400,623                     381,525                     391,424                      28,887               
N_clust                              63,596                      62,791                      63,671                      17,414               
----------------------------------------------------------------------------------------------------------------------------------------------

. 
.         
.         
. 
. ***********************************************************************************
. * Table 6: Falsification Tests Using Placebo-Treatments
. *********************************************************************************** 
. 
. preserve

. 
.         merge 1:1 geo time using "$WORKDATA/result_psmatch.dta", update 

    Result                           # of obs.
    -----------------------------------------
    not matched                       301,616
        from master                   301,616  (_merge==1)
        from using                          0  (_merge==2)

    matched                           111,021
        not updated                   111,021  (_merge==3)
        missing updated                     0  (_merge==4)
        nonmissing conflict                 0  (_merge==5)
    -----------------------------------------

. 
.         drop if missing(matchid)
(301,616 observations deleted)

.         drop _merge

. 
.         ** keep only when a month is available for both matched obs
.         bysort matchid time: gen count = _N 

.         keep if count == 2
(45,029 observations deleted)

. 
.         sort matchid geo time_disclosure

. 
.         foreach num of numlist 1(1)12 {
  2.                 cap drop f_`num'
  3.                 cap drop fc_`num'
  4.                 gen f_`num' = time_disclosure==-`num'
  5.                 gen fc_`num' = f_`num'*complier
  6.         }

.         
.         xtset geo time
       panel variable:  geo (unbalanced)
        time variable:  time, 2013m1 to 2015m9, but with gaps
                delta:  1 month

.         xtreg logkaufp i.time epc f_1-fc_5, fe vce(cluster matchid)

Fixed-effects (within) regression               Number of obs      =     65992
Group variable: geo                             Number of groups   =     13960

R-sq:  within  = 0.1812                         Obs per group: min =         1
       between = 0.0034                                        avg =       4.7
       overall = 0.0014                                        max =        30

                                                F(43,6979)         =     37.79
corr(u_i, Xb)  = -0.1194                        Prob > F           =    0.0000

                            (Std. Err. adjusted for 6,980 clusters in matchid)
------------------------------------------------------------------------------
             |               Robust
    logkaufp |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
        time |
        637  |  -.0035375   .0021892    -1.62   0.106     -.007829     .000754
        638  |  -.0084833   .0027676    -3.07   0.002    -.0139086    -.003058
        639  |  -.0124046   .0034786    -3.57   0.000    -.0192237   -.0055854
        640  |  -.0202645   .0036749    -5.51   0.000    -.0274685   -.0130606
        641  |  -.0275933   .0040065    -6.89   0.000    -.0354472   -.0197394
        642  |   -.033277   .0044944    -7.40   0.000    -.0420874   -.0244666
        643  |  -.0437318   .0046025    -9.50   0.000    -.0527541   -.0347096
        644  |  -.0501796   .0047932   -10.47   0.000    -.0595758   -.0407834
        645  |  -.0584291   .0049979   -11.69   0.000    -.0682265   -.0486316
        646  |  -.0660403   .0051402   -12.85   0.000    -.0761166    -.055964
        647  |  -.0716004   .0052843   -13.55   0.000    -.0819592   -.0612415
        648  |  -.0788376   .0054323   -14.51   0.000    -.0894865   -.0681886
        649  |  -.0855714   .0055824   -15.33   0.000    -.0965146   -.0746281
        650  |  -.0934407   .0057344   -16.29   0.000    -.1046818   -.0821997
        651  |  -.1012275   .0058934   -17.18   0.000    -.1127804   -.0896746
        652  |  -.1077807   .0061052   -17.65   0.000    -.1197488   -.0958126
        653  |  -.1157671    .006299   -18.38   0.000    -.1281151   -.1034191
        654  |  -.1248401   .0064421   -19.38   0.000    -.1374687   -.1122116
        655  |  -.1318186   .0066667   -19.77   0.000    -.1448875   -.1187498
        656  |  -.1408247   .0068924   -20.43   0.000     -.154336   -.1273135
        657  |  -.1479177   .0072238   -20.48   0.000    -.1620785   -.1337569
        658  |  -.1561393   .0074408   -20.98   0.000    -.1707255   -.1415532
        659  |  -.1599097   .0077787   -20.56   0.000    -.1751584    -.144661
        660  |    -.16596   .0083681   -19.83   0.000    -.1823642   -.1495559
        661  |  -.1687764   .0082807   -20.38   0.000    -.1850091   -.1525437
        662  |  -.1727355   .0084973   -20.33   0.000    -.1893928   -.1560783
        663  |  -.1796777   .0088941   -20.20   0.000    -.1971128   -.1622426
        664  |  -.1857001    .009207   -20.17   0.000    -.2037487   -.1676516
        665  |  -.1916268   .0095114   -20.15   0.000    -.2102719   -.1729816
        666  |  -.2007543    .009899   -20.28   0.000    -.2201593   -.1813493
        667  |    -.20876   .0102024   -20.46   0.000    -.2287597   -.1887603
        668  |  -.2164237   .0105871   -20.44   0.000    -.2371776   -.1956698
             |
         epc |  -.0123052   .0040042    -3.07   0.002    -.0201546   -.0044558
         f_1 |   .0032491   .0009957     3.26   0.001     .0012971     .005201
        fc_1 |   -.005999   .0036432    -1.65   0.100    -.0131408    .0011427
         f_2 |    .004571    .001362     3.36   0.001     .0019011    .0072409
        fc_2 |  -.0027188   .0034535    -0.79   0.431    -.0094887    .0040512
         f_3 |   .0039324   .0015915     2.47   0.013     .0008127    .0070522
        fc_3 |  -.0020797   .0032175    -0.65   0.518    -.0083869    .0042276
         f_4 |   .0040211   .0016331     2.46   0.014     .0008197    .0072224
        fc_4 |  -.0009413   .0028457    -0.33   0.741    -.0065197    .0046371
         f_5 |   .0035768   .0014797     2.42   0.016     .0006761    .0064775
        fc_5 |  -.0003725   .0023748    -0.16   0.875    -.0050277    .0042827
       _cons |   12.45648   .0051012  2441.85   0.000     12.44648    12.46648
-------------+----------------------------------------------------------------
     sigma_u |  .60897265
     sigma_e |  .04601519
         rho |   .9943228   (fraction of variance due to u_i)
------------------------------------------------------------------------------

.         est sto did_falsific

.         
.         estout did_falsific, ///
>         cells("b(fmt(3) star) se(fmt(3))" /*ci(fmt(3))*/   ) ///
>         stats(N N_g, fmt(%9.0fc %9.0fc)) ///
>         varwidth(12) starlevels(* 0.05 ** 0.01) ///
>         drop(*time _cons f_*) // style(tex)     

----------------------------------------
             did_falsific               
                        b             se
----------------------------------------
epc                -0.012**        0.004
fc_1               -0.006          0.004
fc_2               -0.003          0.003
fc_3               -0.002          0.003
fc_4               -0.001          0.003
fc_5               -0.000          0.002
----------------------------------------
N                  65,992               
N_g                13,960               
----------------------------------------

. restore 

.         
. 
.         
. ***************************
. * Table 8 (Online Appendix I): Estimates that control for duration 
. ***************************
. 
. * OLS regression
. *******************
. 
. xtset plz
       panel variable:  plz (unbalanced)

. xtreg logkaufp epc $merkat_i $merkont ib1.objektzus ib5.anbietertyp i.time i.duration_kat if geolast, fe vce(robust)
note: 4.anbietertyp omitted because of collinearity
note: 5b.anbietertyp identifies no observations in the sample

Fixed-effects (within) regression               Number of obs     =     65,486
Group variable: plz                             Number of groups  =      7,333

R-sq:                                           Obs per group:
     within  = 0.5514                                         min =          1
     between = 0.1777                                         avg =        8.9
     overall = 0.2986                                         max =        119

                                                F(73,7332)        =     681.18
corr(u_i, Xb)  = -0.0032                        Prob > F          =     0.0000

                                     (Std. Err. adjusted for 7,333 clusters in plz)
-----------------------------------------------------------------------------------
                  |               Robust
         logkaufp |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
------------------+----------------------------------------------------------------
              epc |   .0780907   .0036264    21.53   0.000      .070982    .0851994
                  |
    baujahr_adopt |
            1977  |   .2762364   .0040949    67.46   0.000     .2682093    .2842635
            2002  |   .4152516   .0057267    72.51   0.000     .4040256    .4264775
                  |
     modern_adopt |
            1977  |   .0599212   .0311746     1.92   0.055    -.0011899    .1210323
            2002  |    .070524    .030575     2.31   0.021     .0105882    .1304597
            9999  |   .0356795   .0305004     1.17   0.242      -.02411     .095469
                  |
        objektkat |
             MFH  |   .0145438   .0058671     2.48   0.013     .0030426     .026045
   EFH, Bungalow  |   .1013701   .0040654    24.93   0.000     .0934007    .1093395
              kA  |   -.041351   .0055738    -7.42   0.000    -.0522773   -.0304248
                  |
        qualitaet |
          normal  |  -.1184383   .0046993   -25.20   0.000    -.1276503   -.1092264
         einfach  |  -.2193854   .0103218   -21.25   0.000    -.2396192   -.1991517
              kA  |  -.0878375   .0042625   -20.61   0.000    -.0961933   -.0794817
                  |
          heizart |
   Etagenheizung  |  -.0731886   .0088246    -8.29   0.000    -.0904875   -.0558898
     Ofenheizung  |  -.2020033   .0117892   -17.13   0.000    -.2251136    -.178893
              kA  |  -.0428264   .0033344   -12.84   0.000    -.0493628   -.0362899
                  |
     grundflaeche |   .0003419   8.22e-06    41.59   0.000     .0003257     .000358
      wohnflaeche |   .0057247   .0001037    55.18   0.000     .0055214    .0059281
      zimmer_cont |  -.0052106   .0011723    -4.44   0.000    -.0075087   -.0029125
    grundflaeche2 |  -5.65e-08   2.07e-09   -27.32   0.000    -6.06e-08   -5.25e-08
     wohnflaeche2 |  -6.26e-06   2.12e-07   -29.49   0.000    -6.68e-06   -5.85e-06
                  |
        objektzus |
renovierungsbed.  |   -.270099   .0059681   -45.26   0.000    -.2817982   -.2583998
              kA  |  -.1239645   .0035148   -35.27   0.000    -.1308544   -.1170746
                  |
      anbietertyp |
        Finanzen  |  -.0300155   .0039351    -7.63   0.000    -.0377295   -.0223015
          Makler  |          0  (omitted)
          privat  |          0  (empty)
                  |
             time |
             637  |  -.1550103   .0924675    -1.68   0.094    -.3362732    .0262526
             638  |  -.1247424   .0920577    -1.36   0.175    -.3052021    .0557172
             639  |  -.1491794    .091546    -1.63   0.103    -.3286358     .030277
             640  |  -.1459209     .09181    -1.59   0.112     -.325895    .0340531
             641  |  -.1440231   .0916889    -1.57   0.116    -.3237597    .0357135
             642  |  -.1309985   .0915827    -1.43   0.153     -.310527      .04853
             643  |  -.1340023   .0913081    -1.47   0.142    -.3129924    .0449878
             644  |   -.135616   .0914806    -1.48   0.138    -.3149443    .0437123
             645  |   -.128791   .0917924    -1.40   0.161    -.3087305    .0511485
             646  |  -.1327921   .0913766    -1.45   0.146    -.3119164    .0463323
             647  |  -.1357737   .0917324    -1.48   0.139    -.3155955    .0440481
             648  |  -.1281137    .091699    -1.40   0.162    -.3078701    .0516428
             649  |  -.1188403   .0914369    -1.30   0.194    -.2980828    .0604022
             650  |  -.1118735   .0911221    -1.23   0.220    -.2904991    .0667521
             651  |  -.1117472   .0913817    -1.22   0.221    -.2908816    .0673872
             652  |  -.1395339   .0915212    -1.52   0.127    -.3189417    .0398739
             653  |  -.1480777   .0921983    -1.61   0.108    -.3288129    .0326575
             654  |   -.138887   .0917039    -1.51   0.130     -.318653    .0408791
             655  |  -.1560225   .0917532    -1.70   0.089    -.3358852    .0238401
             656  |  -.1531242   .0915777    -1.67   0.095    -.3326428    .0263944
             657  |  -.1463099   .0918545    -1.59   0.111    -.3263711    .0337513
             658  |   -.147473    .091283    -1.62   0.106    -.3264139    .0314679
             659  |  -.1235862   .0917159    -1.35   0.178    -.3033758    .0562033
             660  |  -.1457654    .091806    -1.59   0.112    -.3257315    .0342007
             661  |   -.147496   .0917065    -1.61   0.108    -.3272671    .0322752
             662  |  -.1172605   .0916472    -1.28   0.201    -.2969153    .0623943
             663  |  -.1197165   .0917027    -1.31   0.192    -.2994802    .0600471
             664  |  -.1109774   .0917102    -1.21   0.226    -.2907557     .068801
             665  |  -.1163246   .0918498    -1.27   0.205    -.2963767    .0637275
             666  |  -.1184615   .0914035    -1.30   0.195    -.2976386    .0607156
             667  |  -.1282959   .0921351    -1.39   0.164    -.3089071    .0523153
             668  |  -.1254263   .0917919    -1.37   0.172    -.3053649    .0545123
             669  |   -.082564   .0914015    -0.90   0.366    -.2617372    .0966093
                  |
     duration_kat |
               2  |   .1871261   .0899672     2.08   0.038     .0107645    .3634877
               3  |   .1961268   .0898774     2.18   0.029     .0199413    .3723124
               4  |   .2109368   .0900224     2.34   0.019      .034467    .3874066
               5  |   .2060955   .0898767     2.29   0.022     .0299114    .3822797
               6  |   .1959762   .0898994     2.18   0.029     .0197476    .3722049
               7  |   .1920583   .0899235     2.14   0.033     .0157823    .3683343
               8  |   .1963338   .0898929     2.18   0.029     .0201179    .3725498
               9  |   .1760337   .0901536     1.95   0.051    -.0006933    .3527606
              10  |    .173738   .0900222     1.93   0.054    -.0027315    .3502074
              11  |   .1705776   .0901933     1.89   0.059    -.0062273    .3473825
              12  |   .1561604   .0901582     1.73   0.083    -.0205757    .3328965
              13  |   .1628756   .0906966     1.80   0.073    -.0149158    .3406671
              14  |   .1739782    .090399     1.92   0.054    -.0032298    .3511862
              15  |    .155553   .0906805     1.72   0.086    -.0222069    .3333129
              16  |   .1526194    .090756     1.68   0.093    -.0252884    .3305273
              17  |   .1257847   .0908121     1.39   0.166    -.0522332    .3038025
              18  |   .1488072   .0898146     1.66   0.098    -.0272553    .3248697
                  |
            _cons |   11.19001   .0384338   291.15   0.000     11.11467    11.26535
------------------+----------------------------------------------------------------
          sigma_u |  .55372725
          sigma_e |  .31584176
              rho |  .75451917   (fraction of variance due to u_i)
-----------------------------------------------------------------------------------

. est sto ols

. 
. 
. * DiD regressions
. *******************
. 
. * DiD: 
. tsset geo time
       panel variable:  geo (unbalanced)
        time variable:  time, 2013m1 to 2015m10, but with gaps
                delta:  1 month

. qui xtreg logkaufp epc i.time i.duration_kat, fe vce(cluster geo)

. est sto did

. 
. * DiD heterogenität nach Baujahr:
. qui xtreg logkaufp epc epc_bau_1977 epc_bau_1900 i.time i.duration_kat, fe vce(cluster geo)

. est sto did_bau

. 
. 
. * IV regressions
. *****************
. 
. * IV: Parsimonious Specification
. quietly xtivreg logkaufp i.time i.duration_kat (epc = bankspost), fe vce(cluster geo) first

. est sto iv

. 
. * IV regressions: heterogeneity by baujahr (interaction effects)
. quietly xtivreg logkaufp i.time i.duration_kat (epc_bau_1900 epc_bau_1977 epc = bankspost_bau_1900 bankspost_bau_1977 bankspost), fe vce(cluster geo)

. est sto iv_bau  

.         
. 
. ** results for paper
. estout ols did did_bau iv iv_bau, ///
>         cells( "b(fmt(3) star) se(par fmt(3))" ) ///
>         stats(N N_clust, fmt(%9.0fc %9.0fc)) ///
>         varwidth(12) substitute(_ \_) ///
>         starlevels(* 0.05 ** 0.01) ///
>         keep(epc epc*) // style(tex)

--------------------------------------------------------------------------------------------------------------------------------------------------------
                      ols                         did                     did\_bau                          iv                      iv\_bau               
                        b             se            b             se            b             se            b             se            b             se
--------------------------------------------------------------------------------------------------------------------------------------------------------
epc                 0.078**      (0.004)       -0.013**      (0.001)        0.008**      (0.003)       -0.117**      (0.018)       -0.029        (0.020)
epc\_bau\_1977                                                               -0.010**      (0.003)                                   -0.043*       (0.017)
epc\_bau\_1900                                                               -0.031**      (0.003)                                   -0.099**      (0.016)
--------------------------------------------------------------------------------------------------------------------------------------------------------
N                  65,486                     412,637                     412,637                     412,637                     412,637               
N\_clust             7,333                      65,486                      65,486                      65,486                      65,486               
--------------------------------------------------------------------------------------------------------------------------------------------------------

.         
. if ($LOGTIME == 1)      log close       
      name:  <unnamed>
       log:  C:/Users/agerster/Dropbox/Projekt_Gebaeudeausweis/Auswertung JAERE_final/log/2019_6_5_analyses_price_effects.log
  log type:  text
 closed on:   5 Jun 2019, 15:38:33
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
